home *** CD-ROM | disk | FTP | other *** search
- Path: news.ov.com!news
- From: glenn@ov.com (Fletcher.Glenn@ov.com)
- Newsgroups: comp.lang.c
- Subject: Re: Where Can I Find Standard C Library S
- Date: 7 Feb 1996 22:27:33 GMT
- Organization: OpenVision
- Message-ID: <4fb90l$ouo@spanky.pls.ov.com>
- References: <4fb8mf$ouo@spanky.pls.ov.com>
- Reply-To: glenn@ov.com
- NNTP-Posting-Host: foghorn.pls.ov.com
-
- In article ouo@spanky.pls.ov.com, glenn@ov.com (Fletcher.Glenn@ov.com) writes:
- >In article jt@mother.usf.edu, yatesc@csee.usf.edu (Randy Yates) writes:
- >>I mean the source for functions like printf and strcpy.
- >>
- >>I've read the FAQ but didn't see anything about this.
- >>--
- >>% Randy Yates % "...the answer lies within your soul
- >>% EE/Mathematics Student % 'cause no one knows which side
- >>% University of South Florida % the coin will fall."
- >>% <yatesc@csee.usf.edu> % 'Big Wheels', *Out of the Blue*, ELO
- >>
- >
- >printf is usually very system specific once you get down to the level
- >of actually outputting characters to a display device. Therefore,
- >you can only talk about source for a specific platform.
- >
- >As for strcpy:
- >
- >int strcpy(char *destination, char *source)
- >{
- > while((*destination++ = *source++) != '\0');
- >}
- >
- >In general, it depends on the purpose of the function as to how
- >platform independent the source is. Usually anything that uses
- >system hardware (I/O devices, Floating Point Units, etc) is
- >system dependent, and just about everything else is not.
- >
- > Fletcher.Glenn@ov.com
- >
- >
-
-
- Whoops! for strcpy:
-
- char *strcpy(char *destination, char *source)
- {
- char *retval;
-
- retval = destination;
- while((*destination++ = *source++) != '\0');
- return(retval);
- }
- Fletcher.Glenn@ov.com
-
-